home *** CD-ROM | disk | FTP | other *** search
/ Strategy Challenges Collection / Strategy Challenges Collection.iso / pc / demo / demodata / menu.dxr / 00102.ls < prev    next >
Encoding:
Text File  |  1996-10-02  |  1.3 KB  |  51 lines

  1. on enterFrame
  2.   global gBeenThere, gVoiceFlag
  3.   if gBeenThere = 0 then
  4.     repeat with nn = 3 to 5
  5.       puppetSprite(nn, 1)
  6.     end repeat
  7.     if gVoiceFlag = 0 then
  8.       puppetSound("SubMain.aif")
  9.       set gVoiceFlag to 1
  10.     end if
  11.     set gBeenThere to 1
  12.   end if
  13. end
  14.  
  15. on exitFrame
  16.   go(the frame)
  17.   SubmenuRoll()
  18.   timeOutCheck()
  19. end
  20.  
  21. on SubmenuRoll
  22.   if the mouseCast > 1 then
  23.     set tempName to the name of cast the mouseCast
  24.     if tempName contains "_Roll" then
  25.       nothing()
  26.     else
  27.       repeat with nn = 3 to 5
  28.         if the castNum of sprite nn < 1 then
  29.           next repeat
  30.         end if
  31.         if the name of cast the castNum of sprite nn contains "_Roll" then
  32.           set tempOld to the name of cast the castNum of sprite nn
  33.           set tempOld to chars(tempOld, 1, length(tempOld) - 5)
  34.           set the castNum of sprite nn to the number of member tempOld
  35.           exit repeat
  36.         end if
  37.       end repeat
  38.       repeat with nn = 3 to 5
  39.         if the castNum of sprite nn < 1 then
  40.           next repeat
  41.         end if
  42.         if the name of cast the castNum of sprite nn = tempName then
  43.           set the castNum of sprite nn to the number of member (tempName & "_Roll")
  44.           exit repeat
  45.         end if
  46.       end repeat
  47.     end if
  48.   end if
  49.   updateStage()
  50. end
  51.